package com.example.shoppingmallspringboot.service.impl;

import com.example.shoppingmallspringboot.entity.Category;
import com.example.shoppingmallspringboot.mapper.CategoryMapper;
import com.example.shoppingmallspringboot.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public List<Category> findAll() {
        return categoryMapper.selectList(null);
    }

    @Override
    public Category findById(Integer id) {
        return categoryMapper.selectById(id);
    }



} 